-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove some remnants of Python2 #243
Conversation
except ImportError: | ||
# OrderedDict from Python 2.7+ | ||
|
||
# Copyright (c) 2009 Raymond Hettinger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I know this guy... Met him in person when he was in Israel.
The only concern I see here, is that the next pull from upstream is gonna be painful... Beside that if all tests pass Also why do this cleanup now ? and not wait for upstream to do it ? |
I did open this PR in upstream too: datastax#1172 There isn't any burning reason to do the cleanup now - it just irks me to see all this unnecessary baggage so I want to get rid of it. |
looks like upstream are gonna take it slowly... maybe we should just merge it, if we confident enough with the changes, maybe it move upstream a bit faster knowing most of it was tested and released by us, merging from upstream next time would be painful |
Actually I started to split upstream PR into multiple simple commits, so it's easier to review - maybe that'll speed things up? |
I'm o.k. with both options. |
just a remark, once |
upstream merged: so we should be start a sync with upstream, and close this one |
As we no longer support Python 2, there is no reason to keep this dependency. This commit removes all usages of six and removes it from dependencies.
There are some stale mentions in docs / comments about Python versions that are no longer supported. There are also some workarounds to make driver work with those versions. This commit removes all mentions and workarounds that I was able to find.
six.iterkeys() returns an iterator, but Python's dict.keys() does not, so to pass it to iter() it needs to be first passed trough iter().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We recently dropped support for Python < 3.6, but there were still a lot of places in the codebase with workarounds required for those versions - most notably usage of
six
package.This PR removes all usages of
six
, removessix
from dependencies, removes all workarounds for older versions that I found and fixes comments / docs references.There are 2 commits. First one drops
six
- it is pretty big, but the changes are mostly very simple and mechanical.Second one removes other mentions / workaround, unrelated to
six
.